//
//  DownLoadManager.h
//  ACMediaFrameExample
//
//  Created by 付顺龙 on 2019/3/11.
//  Copyright © 2019 ArthurCao. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "NSString+CZHash.h"
NS_ASSUME_NONNULL_BEGIN


typedef void (^successBlock) (NSString *fileStorePath);
typedef void (^faileBlock) (NSError *error);
typedef void (^progressBlock) (float progress);

@interface DownLoadManager : NSObject <NSURLSessionDataDelegate>
@property (copy) successBlock  successBlock;
@property (copy) faileBlock      failedBlock;
@property (copy) progressBlock    progressBlock;


-(void)downLoadWithURL:(NSString *)URL
              progress:(progressBlock)progressBlock
               success:(successBlock)successBlock
                 faile:(faileBlock)faileBlock;

+ (instancetype)sharedInstance;
-(void)stopTask;

@end


NS_ASSUME_NONNULL_END
